package com.agricultural.machine.factory;

import com.agricultural.machine.factory.AbstractMachine;

/**
 * 收割机类
 */
public class HarvesterMachine extends AbstractMachine {
    public HarvesterMachine() {
        super("harvester");
    }

    @Override
    public void work() {
        if (isRunning()) {
            System.out.println("收割机 " + getMachineId() + " 正在收割作物...");
        } else {
            System.out.println("收割机 " + getMachineId() + " 未启动，无法工作");
        }
    }
}











